package com.cc.daos;

import java.util.List;
import java.util.Map;

import com.cc.models.Power;
import com.cc.models.Role;
import com.cc.models.User;

public interface UserMapper {
	
	public void addUser(User user);
	
	public void delUser(Integer userId);
	
	public void updateUser(User user);
	
	public User findUserById(Integer userId);
	
	public List<User> findAll();
	
	public List<User> findUserByParam(Map params);
	
	public List<User> findUserWithPage(Map params);
	
	public int countByParams(Map params);
	
	/**
	 * 查询角色
	 * @param user
	 * @return
	 */
	public List<Role> queryRoleByUser(User user);
	
	/**
	 * 查询权限
	 * @param user
	 * @return
	 */
	public List<Power> queryPowerByUser(User user);
}
